import { Entity, PrimaryGeneratedColumn, Column } from "typeorm";
import { ApiProperty } from "@nestjs/swagger";

@Entity()
export class Book{
    @PrimaryGeneratedColumn('uuid')
    id: string

    @ApiProperty({title:'名称'})
    @Column()
    name:string

    @ApiProperty({title:'价格'})
    @Column('float')
    price: number

    @ApiProperty({title:'作者'})
    @Column()
    author:string
}